# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit kde-base
need-kde 3

IUSE=""
DESCRIPTION="A KDE Photo Organizer"
HOMEPAGE="http://kphotobook.berlios.de/"
SRC_URI="http://download2.berlios.de/kphotobook/${P}.tar.bz2"
RESTRICT="nomirror"

LICENSE="GPL-2"
KEYWORDS="x86"

newdepend ">=kde-base/kdelibs-3.2
	   >=media-libs/libexif-0.5.7"

src_unpack () {

	unpack ${A}
	cd ${S}

	# Fix the configure script, which does not handle the leading '--' for options
	epatch ${FILESDIR}/kphotobook-0.0.7-configure.patch
	epatch ${FILESDIR}/kphotobook-0.0.7-nodocumentation.patch
}

src_install() {
	make DESTDIR="${D}" install || die "install failed"

	# for some reason, kphotobook installs itself into /usrhost/ ...
	( mv ${D}/usrhost ${D}/usr )
}